#include <stdio.h>
#include <string.h>

typedef struct student
{
    int number;
    char name[20];
    char sex[10];
    int age;
    float score;
}student_t;


int main(int argc, char const *argv[])
{
    student_t stu1;
    int buf[10];

    memset(&stu1,0,sizeof(student_t));
    printf("stu1信息:\n");
    printf("sut1.number :%d\n",stu1.number);
    printf("sut1.name   :%s\n",stu1.name  );
    printf("sut1.sex    :%s\n",stu1.sex   );
    printf("sut1.age    :%d\n",stu1.age   );
    printf("sut1.score  :%f\n",stu1.score );
    
    for (int i = 0; i < 10; i++)
    {
        printf("buf[%d]=%d\n",i,buf[i]);
    }

    memset(buf,0,sizeof(buf));  //将数组buf置位（清零）  多用于结构体、联合体、组
    for (int i = 0; i < 10; i++)
    {
        printf("buf[%d]=%d\n",i,buf[i]);
    }
    return 0;
}
